import type { App } from 'vue'
import formCreate from '@form-create/element-ui'
import install from '@form-create/element-ui/auto-import'
import FormDesigner from '../components/index';
import { ElAlert,ElTransfer,ElDivider} from 'element-plus';
import 'element-plus/es/components/alert/style/css'
import 'element-plus/es/components/transfer/style/css'
import 'element-plus/es/components/divider/style/css'


function useElemenuUiComps(app: App){
  app.component(ElAlert.name, ElAlert)
  app.component(ElTransfer.name, ElTransfer)
  app.component(ElDivider.name, ElDivider)
}

function useFormDesigner(app: App){
  formCreate.use(install)
  app.use(formCreate)
  app.component('FormDesigner',FormDesigner)
}


export function useAll(app: App) {
  useFormDesigner(app)
  useElemenuUiComps(app)
}
